package test;

import runnable.SaleTicket;

/**
 * @classname:SaleTicketTest2
 * @description:
 * @author: Mr.Z
 * @date: 2020/12/18 23:55
 * @version: 0.1
 * @since:1.8
 */
public class SaleTicketTest2 {
    public static void main(String[] args) {
        SaleTicket saleTicket = new SaleTicket();
//        new Thread(new Runnable() {
//            @Override
//            public void run() {
//                saleTicket.saleTicket();
//            }
//        },"窗口1 ").start();
//        new  Thread(()->saleTicket.saleTicket(),"窗口2").start();
//        new Thread(()->saleTicket.saleTicket(),"窗口3").start();

        for (int i =1; i <= 5; i++) {
            new Thread(()->saleTicket.saleTicket(),"窗口"+i).start();
        }
    }
}
